-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add ruby examples for the using selenium page #1649
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
...to expand_ruby_examples_on_docs
...modified the using selenium spec files
✅ Deploy Preview for selenium-dev ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
PR Description updated to latest commit (9009895)
- Copy walkthrough table to "Files Changed" Tab
PR Review
2, because the PR involves adding Ruby examples to existing documentation and codebase, which is straightforward. The changes are well-scoped and focused on enhancing Ruby documentation and examples, making it easier to review.
Yes
Missing Tests: The PR adds new Ruby examples but does not mention the addition of tests for these examples. It's important to ensure that these examples work as expected and remain functional with future changes.
Documentation Consistency: The PR adds Ruby examples to the documentation. It's crucial to ensure that these examples are consistent with the Selenium documentation style and with examples provided for other languages.
No
✨ Review tool usage guide:
Overview:
The review tool scans the PR code changes, and generates a PR review which includes several types of feedbacks, such as possible PR issues, security threats and relevant test in the PR. More feedbacks can be added by configuring the tool.
The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on any PR.
- When commenting, to edit configurations related to the review tool (
pr_reviewersection), use the following template:
/review --pr_reviewer.some_config1=... --pr_reviewer.some_config2=...
- With a configuration file, use the following template:
[pr_reviewer]
some_config1=...
some_config2=...
See the review usage page for a comprehensive guide on using this tool.
PR Code Suggestions
✨ Improve tool usage guide:Overview:
See the improve usage page for a comprehensive guide on using this tool. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aguspe looks like the build fails due to the changes in the file, it is probably better to leave the rspec_helper in.
@diemol sorry for the delay, I have rolled back the spec helper removal but I have one question,
On the using selenium spec originally the test finished with driver.quit
However, on the spec helper we have in line config.after { @driver&.quit }
So if you execute the example normally, the example fails because the config.after trying to quit and already quit the driver, that's why I removed it also to keep the examples more cohesively, by having the hooks in one file
Right now, I deleted the after hook on the using selenium file and I'm using the config.after hook for the example.
However, I have two questions:
- Is it on purpose that the original selenium spec file fails if executed by itself?
- Do we want to assume that somebody starting to use Rspec and Selenium
This is the error that occurs when executing the using_selenium_spec.rb currently:
`Errno::ECONNREFUSED: Failed to open TCP connection to 127.0.0.1:9515 (Connection refused - connect(2) for "127.0.0.1" port 9515)
-
Using Selenium uses eight components
Failure/Error: config.after { @driver&.quit }Errno::ECONNREFUSED:
Failed to open TCP connection to 127.0.0.1:9515 (Connection refused - connect(2) for "127.0.0.1" port 9515)`
Thank you so much for the help and the review!
After this PR is merged I will continue updating the docs for Ruby, also, just to know if it would be helpful, my mother tongue is Spanish, would it help if I add Spanish translations or would that give more work to other people maintaining the docs?
Also @diemol, another question that might be a bit dumb, where can I see the Netlify deployment? it's okay if I don't have access I just wanna check that I'm not missing anything since I'm trying to follow the committer rules and to give you less work on the reviews
On the using selenium spec originally the test finished with driver.quit
OK, so probably this was not being executed in CI. But now the idea is to show an example with a test runner, so I believe the changes make sense.
Is it on purpose that the original selenium spec file fails if executed by itself?
The idea is to execute it with the test runner, which is the text shown before the complete code example.
Do we want to assume that somebody starting to use Rspec and Selenium
We are not assuming that, we are simply showing that as a test runner.
Also @diemol, another question that might be a bit dumb, where can I see the Netlify deployment? it's okay if I don't have access I just wanna check that I'm not missing anything since I'm trying to follow the committer rules and to give you less work on the reviews
The deployment can be seen in a URL posted by Netlify above. However, you can always run this site locally and avoid waiting for the deployment (the deployment needs to be approved manually when it comes from a non-trusted repository).
After this PR is merged I will continue updating the docs for Ruby, also, just to know if it would be helpful, my mother tongue is Spanish, would it help if I add Spanish translations or would that give more work to other people maintaining the docs?
Thank you for the offer. @titusfortner is exploring alternatives because it has proven to be extremely hard to maintain the documentation in different languages.
* first script update * Remove selenium manager error * Add examples on translations * Reverse title * Move example to README.md and link to example * Added examples for the using_selenium page in multiple languages and modified the using selenium spec files * Remove the added quit and roll back the spec helper * Remove accidental typo --------- Co-authored-by: aguspe <agustin.pe94@gmail.com> Co-authored-by: Diego Molina <diemol@users.noreply.github.com> [deploy site] 7c4416b
On the using selenium spec originally the test finished with driver.quit
OK, so probably this was not being executed in CI. But now the idea is to show an example with a test runner, so I believe the changes make sense.
Is it on purpose that the original selenium spec file fails if executed by itself?
The idea is to execute it with the test runner, which is the text shown before the complete code example.
Do we want to assume that somebody starting to use Rspec and Selenium
We are not assuming that, we are simply showing that as a test runner.
Also @diemol, another question that might be a bit dumb, where can I see the Netlify deployment? it's okay if I don't have access I just wanna check that I'm not missing anything since I'm trying to follow the committer rules and to give you less work on the reviews
The deployment can be seen in a URL posted by Netlify above. However, you can always run this site locally and avoid waiting for the deployment (the deployment needs to be approved manually when it comes from a non-trusted repository).
After this PR is merged I will continue updating the docs for Ruby, also, just to know if it would be helpful, my mother tongue is Spanish, would it help if I add Spanish translations or would that give more work to other people maintaining the docs?
Thank you for the offer. @titusfortner is exploring alternatives because it has proven to be extremely hard to maintain the documentation in different languages.
Great thank you for the answers and the explanation!
Have a great weekend
Uh oh!
There was an error while loading. Please reload this page.
User description
Description
Currently, the using selenium page is lacking examples in ruby and this PR aims to add those examples
Screenshot 2024年03月29日 at 14 00 12Motivation and Context
This will help people starting with selenium and ruby to easily execute their first test and also provide a better overview through examples
Types of changes
Checklist
Type
enhancement, documentation
Description
beforeandafterhooks for better test setup and teardown.fs-extrapackage version inpackage-lock.jsonto 11.2.0.Changes walkthrough
README.md
Add Ruby Script Execution Instructionsexamples/ruby/README.md
using_selenium_spec.rb
Enhance Ruby Selenium Test Exampleexamples/ruby/spec/getting_started/using_selenium_spec.rb
beforeandafterhooks for setup and teardown.selenium_manager.en.md
Fix Broken Link in Selenium Manager Documentationwebsite_and_docs/content/documentation/selenium_manager.en.md
first_script.en.md
Add Ruby Example for Running Selenium Fileswebsite_and_docs/content/documentation/webdriver/getting_started/first_script.en.md
using_selenium.en.md
Add Ruby Examples for Using Seleniumwebsite_and_docs/content/documentation/webdriver/getting_started/using_selenium.en.md
with Selenium.
package-lock.json
Update fs-extra Package Versionwebsite_and_docs/package-lock.json
fs-extrapackage from version 11.1.0 to 11.2.0.